(use-package rustic
  :ensure
  :custom
  (rustic-indent-offset 4)
  (rustic-lsp-setup-p nil) ;; Don't load lsp automatically. Use `M-X lsp RET` to load it.
  (rustic-lsp-server 'rust-analyzer)
  (rustic-lsp-format t)
  (rustic-format-on-save nil)
  :config
  (add-hook 'rustic-mode-hook 'starsoul-rustic-mode-hook))

(defun starsoul-rustic-mode-hook ()
  (electric-indent-mode 1)
  (setq tab-width 4))

(use-package toml-mode
  :ensure)

(provide 'init_rust)
